
import Request from '@/utils/request'

export const getClassifyList = (params)=>{
    return new Promise((resolve,reject) =>{
        Request.post('/boss/ask/classify/list',params)
        .then(res =>{
            resolve(res.data)
        })
    })
}

export const getCompanyList = (params)=>{
    return new Promise((resolve,reject) =>{
        Request.post('/boss/ask/company/list',params)
        .then(res =>{
            resolve(res.data)
        })
    })
}

export const getQuestionDetail = (id,uid)=>{
    return new Promise((resolve,reject) =>{
        Request.get(`/boss/ask/question/${id}?userId=${uid}`)
        .then(res =>{
            resolve(res.data)
        })
    })
}

export const editQuestion = (params)=>{
    return new Promise((resolve,reject) =>{
        Request.post('/boss/ask/question/edit',params)
        .then(res =>{
            resolve(res.data)
        })
    })
}

export const addQuestion = (params)=>{
    return new Promise((resolve,reject) =>{
        Request.post('/boss/ask/question/add',params)
        .then(res =>{
            resolve(res.data)
        })
    })
}

export const getCustomList = (params)=>{
    return new Promise((resolve,reject) =>{
        Request.post('/boss/ask/custom/list',params)
        .then(res =>{
            resolve(res.data)
        })
    })
}

export const getUserInfo = (id)=>{
    return new Promise((resolve,reject) =>{
        Request.get(`/app/user/${id}`)
        .then(res =>{
            resolve(res.data)
        })
    })
}

export const editUserInfo = (params)=>{
    return new Promise((resolve,reject) =>{
        Request.post('/app/update/user/info',params)
        .then(res =>{
            resolve(res.data)
        })
    })
}

export const sendTemplateMsg = (params)=>{
    return new Promise((resolve,reject) =>{
        Request.post('/boss/ask/send/template/msg',params)
        .then(res =>{
            resolve(res.data)
        })
    })
}

export const getOrderList = (params)=>{
    return new Promise((resolve,reject) =>{
        Request.post('/boss/ask/order/list',params)
        .then(res =>{
            resolve(res.data)
        })
    })
}

export const getTeacherList = (params)=>{
    return new Promise((resolve,reject) =>{
        Request.post('/boss/ask/teacher/list',params)
        .then(res =>{
            resolve(res.data)
        })
    })
}

export const sendRemindMsg = (params)=>{
    return new Promise((resolve,reject) =>{
        Request.post('/boss/ask/add-send-template-msg',params)
        .then(res =>{
            resolve(res.data)
        })
    })
}


